<cp-navbar (onClickLeft)="onClickLeft()"></cp-navbar>
<div class="error" *ngIf="error"><cp-error (reload)="handleReload()"></cp-error></div>
<div class="loading" *ngIf="loading"><cp-loading></cp-loading></div>
<div class="container" *ngIf="!error && !loading">
  <div class="list" *ngIf="list.length > 0">
    <div class="gutter"></div>
    <div class="item" *ngFor="let item of list; trackBy: trackByFn">
      <div
        class="top border-bottom"
        routerLink="/workspace/estate/detail"
        [queryParams]="{ project: item.ProjectSearchView.Id }"
      >
        <div class="left">{{ item.ProjectSearchView.Name }}</div>
        <div class="right"><i class="icon icon-right"></i></div>
      </div>
      <!-- <div class="middle" routerLink="../commentDetail" queryParams="{id: item.Id}"> -->
      <div class="middle">
        <div class="title">
          <p class="txt" *ngIf="!item.LayoutReference">
            对 <span class="huxing1">楼盘 - {{ item.ProjectSearchView.Name }}</span> 的点评
          </p>
          <p class="txt" *ngIf="item.LayoutReference">
            对 <span class="huxing1">户型 - {{ item.LayoutReference.Name }}</span> 的点评
          </p>
          <i class="icon icon-image" *ngIf="item.Photo"></i>
        </div>
        <div class="content">{{ item.Content }}</div>
      </div>
      <div class="bottom">
        <div class="time">{{ item.DateTime }}</div>
        <div class="zan">
          <i class="icon icon-dianzan"></i>
          <p class="num">{{ item.Praise }}</p>
        </div>
      </div>
    </div>
  </div>
  <cp-loadmore *ngIf="list.length > 0 && !nomore"></cp-loadmore>
  <cp-nomore *ngIf="list.length > 5 && nomore"></cp-nomore>
  <div class="empty" *ngIf="list.length === 0"><cp-empty></cp-empty></div>
</div>
